package org.jeecg.modules.charge.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.charge.entity.Cancellaction;
import org.jeecg.modules.charge.entity.ChargeInvoiceInhouse;
import org.jeecg.modules.charge.entity.ChargeInvoiceTree;
import org.jeecg.modules.charge.entity.ChargeInvoiceType;

import java.util.List;

/**
 * @Description: 票据入库
 * @Author: jeecg-boot
 * @Date:   2019-08-08
 * @Version: V1.0
 */
public interface ChargeInvoiceInhouseMapper extends BaseMapper<ChargeInvoiceInhouse> {

    public String selectId(@Param("id") String id);

    public Integer getGroupIsExits(ChargeInvoiceInhouse chargeInvoiceInhouse);

    public void updateInHouse(ChargeInvoiceInhouse chargeInvoiceInhouse);

    public List<String> getOfficeIdsByUid (@Param("oid") String oid);

    public List<ChargeInvoiceTree> getInvoicesByOids(@Param("oids") List<String> oids, @Param("typeNum")String typeNum);

    public String  getOidByOcode(@Param("orgCode") String orgCode);

    public List<ChargeInvoiceType> selectTypeAll();

    public List<ChargeInvoiceInhouse> findInvoicePage(IPage<ChargeInvoiceInhouse> page,@Param("chargeInvoiceInhouse") ChargeInvoiceInhouse chargeInvoiceInhouse);

    public List<ChargeInvoiceInhouse> findInvoiceList(ChargeInvoiceInhouse chargeInvoiceInhouse);

    /**插入核销票据信息*/
    public Integer CancellactionHouse(@Param("cancellaction") Cancellaction cancellaction);

    /**核销时间与核销人插入*/
    public Integer updateCanDate(ChargeInvoiceInhouse chargeInvoiceInhouse);

    //查询最大流水号
    public Integer maxSerNum();

    public List<ChargeInvoiceInhouse> getIhouseByDepartIds(@Param("departIds") List<String> departIds);
}
